home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / games / IndiZone / gold / eggClass.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  2.8 KB  |  92 lines

  1. /*
  2.  * The original copyright owners of the accompanying source code files have
  3.  * agreed to place such code into the public domain.  Accordingly, anyone
  4.  * who receives or obtains a copy of such source code is freely entitled to
  5.  * reproduce, use and otherwise exploit such code (including the right to
  6.  * make derivative works), at his/her own risk and expense, without any
  7.  * obligation or liability to the original copyright owners.
  8.  *
  9.  * We would appreciate (but do not require) that the following message be
  10.  * included in any derivative works:
  11.  *
  12.  * "Portions of this program were developed by Peter Broadwell, Rob Myers
  13.  * and Robin Schaufler while working in Silicon Valley."
  14.  *
  15.  * The accompanying source code files and related documentation materials
  16.  * are distributed on an "AS IS" basis, without any warranties or
  17.  * guarantees of any kind.  All implied warranties, including the implied
  18.  * warranties of merchantability and of fitness for any particular purpose,
  19.  * are expressly disclaimed.
  20.  */
  21. #include "gl.h"
  22. #include "geom.h"
  23. #include "selectors.h"
  24. #include "class.h"
  25. #include "classIds.h"
  26. #include "mbox.h"
  27. #include "individual.h"
  28. #include "behavior.h"
  29. #include "doers.h"
  30.  
  31. #include "colors.h"
  32.  
  33. extern class indivClass;
  34. model eggModel;
  35.  
  36. extern char *egginit();
  37.  
  38. fcnTable eggTable[] = {
  39.     INIT,    egginit,    /* build egg drawing */
  40.     EOTABLE,
  41. };
  42.  
  43. class eggClass = {
  44.     &indivClass,
  45.     eggTable,
  46.     sizeof(individual),
  47.     EGG,
  48. };
  49.  
  50. individual eggTemplate = {
  51.             /*   inst        */
  52.     &eggClass,        /* myClass pointer    */
  53.     NULL,        /* classFunctions     */
  54.     0,            /* nFunctions        */
  55.             /*   mailbox        */
  56.     NULL,        /* subscribers          */
  57.     NULL,        /* subscribedTo         */
  58.             /*   individual        */
  59.     {0,0,0},        /* position        */
  60.     {0,0,0},        /* lastPosition        */
  61.     {1,0,0},        /* delta        */
  62.     {0,0,0},        /* velocity        */
  63.     {0,0,0},        /* avelocity        */
  64.     {0,0,0},        /* acceleration        */
  65.     1.0,        /* speed        */
  66.     {0,0,10},        /* heading        */
  67.     {0,0,0},        /* rotation        */
  68.     {0,0,0},        /* influence        */
  69.     10.0,        /* scale                */
  70.     &eggModel,        /* model        */
  71.     NULL,        /* flags        */
  72.     NULL,        /* curVars              */
  73.     NULL,        /* controls             */
  74. };
  75.  
  76. model eggModel = {
  77.     NULL,            /* next model segment          */
  78.     NULL,            /* child model segments        */
  79.     0,                /* geometry compiled yet?      */
  80.     0,                /* compiled geometry object Id */
  81.     NULL,            /* point dictionary            */
  82.     NULL,            /* polygon descriptions        */
  83.     {0 ,0, 0},            /* centroid                    */
  84.     EGG_COLOR,            /* color                       */
  85.     EGG_TEXTURE,        /* texture                     */
  86.     TRUE,            /* outlined                    */
  87.     { 0,0,0},            /* rotation                    */
  88.     { 0,0,0},            /* translation                 */
  89.     { 1.0,1.0,1.0},        /* scale                       */
  90.     15,                /* declasse               */
  91. };
  92.